home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / obero / oberon_lib.lha / oberon-a / source1.lha / source / Amiga / Parallel.mod < prev    next >
Text File  |  1994-08-08  |  3KB  |  100 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: Parallel.mod $
  4.   Description: Interface to parallel.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.2 $
  8.       $Author: fjc $
  9.         $Date: 1994/08/08 00:46:54 $
  10.  
  11.   $VER: parallel.h 36.1 (10.5.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. MODULE Parallel;
  24.  
  25. (*
  26. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  27. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  28. ** $V- OvflChk       $Z- ZeroVars
  29. *)
  30.  
  31. IMPORT E := Exec;
  32.  
  33.  
  34. (*
  35. **
  36. **      parallel.device I/O request structure information
  37. **
  38. *)
  39.  
  40. TYPE
  41.  
  42.   IOPArrayPtr * = CPOINTER TO IOPArray;
  43.   IOPArray * = RECORD
  44.     PTermArray0 * : E.ULONG;
  45.     PTermArray1 * : E.ULONG;
  46.   END; (* IOPArray *)
  47.  
  48. (******************************************************************)
  49. (* CAUTION !!  IF YOU ACCESS the parallel.device, you MUST (!!!!) use
  50.    an IOExtPar-sized structure or you may overlay innocent memory !! *)
  51. (******************************************************************)
  52.  
  53. TYPE
  54.  
  55.   IOExtParPtr * = CPOINTER TO IOExtPar;
  56.   IOExtPar * = RECORD (E.IOStdReq)
  57.   (*par *        : IOStdReq;*)
  58.     pExtFlags *  : SET;      (* (not used) flag extension area *)
  59.     status *     : E.BSET;   (* status of parallel port and registers *)
  60.     parFlags *   : E.BSET;   (* see PARFLAGS bit definitions below *)
  61.     pTermArray * : IOPArray; (* termination character array *)
  62.   END; (* IOExtPar *)
  63.  
  64. CONST
  65.  
  66.   parShared *     = 5;         (* ParFlags non-exclusive access bit *)
  67.   parSlowMode *   = 4;         (*    "     slow printer bit *)
  68.   parFastMode *   = 3;         (*    "     fast I/O mode selected bit *)
  69.   parRadBoogie *  = 3;         (*    "     for backward compatibility *)
  70.   parAckMode *    = 2;         (*    "     ACK interrupt handshake bit *)
  71.   parEofMode *    = 1;         (*    "     EOF mode enabled bit *)
  72.  
  73.   ioParQueued *   = 6;         (* ioFLAGS rqst-queued bit *)
  74.   ioParAbort *    = 5;         (*    "     rqst-aborted bit *)
  75.   ioParActive *   = 4;         (*    "     rqst-qued-or-current bit *)
  76.   ioPtRwDir *     = 3;         (* ioSTATUS read=0,write=1 bit *)
  77.   ioPtParSel *    = 2;         (*    "     printer selected on the A1000 *)
  78.                                (* printer selected & serial "Ring Indicator"
  79.                                   on the A500 & A2000.  Be careful when
  80.                                   making cables *)
  81.   ioPtPaperOut * = 1;          (*    "     paper out bit *)
  82.   ioPtParBusy *  = 0;          (*    "     printer in busy toggle bit *)
  83. (* Note: previous versions of this include files had bits 0 and 2 swapped *)
  84.  
  85.   name *                   = "parallel.device";
  86.  
  87.   cmdQuery *             = E.cmdNonstd;
  88.   cmdSetParams *         = E.cmdNonstd+1;
  89.  
  90.   parErrDevBusy *          = 1;
  91.   parErrBufTooBig *        = 2;
  92.   parErrInvParam *         = 3;
  93.   parErrLineErr *          = 4;
  94.   parErrNotOpen *          = 5;
  95.   parErrPortReset *        = 6;
  96.   parErrInitErr *          = 7;
  97.  
  98.  
  99. END Parallel.
  100.